﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace VOD.Models
{
    public class Comment
    {
        [Key]
        [DisplayName("评论ID")]
        public int CommentID { get; set; }

        [DisplayName("被评论电影")]
        [Required(ErrorMessage = "电影名 不能为空！")]
        public int VideoID { get; set; }

        [DisplayName("用户")]
        public Guid UserID { get; set; }

        public int? ParentID { get; set; }

        [DisplayName("内容")]
        [StringLength(1024)]
        [Required(ErrorMessage = "内容 不能为空！")]
        public string CommentContent { get; set; }

        [DisplayName("评论时间")]
        public DateTime PostTime { get; set; }

        //一条评论对应一部视频
        public virtual Video Video { get; set; }

    }
}